#include "CH341Lib.h"
#include "CH341DLL.H"

#pragma comment(lib,"CH341DLL.LIB")

API int CH341_OpenDivce(ULONG iIndex) {
	if(CH341OpenDevice(iIndex) == INVALID_HANDLE_VALUE)
	{
		return -1;	
	}
	return 0;
}

API int CH341_Set_D5_D0_High(ULONG iIndex) {
	return !CH341Set_D5_D0(iIndex, 0xFF, 0xFF);
}

API int CH341_Set_D5_D0_Low(ULONG iIndex) {
	return !CH341Set_D5_D0(iIndex, 0xFF, 0x00);
}

API void CH341_CloseDevice(ULONG iIndex) {
	return CH341CloseDevice(iIndex);
}